package hongcaosp.app.android.modle.impl;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.HttpParams;

import hongcaosp.app.android.BuildConfig;
import hongcaosp.app.android.modle.BaseResponse;
import hongcaosp.app.android.modle.DataCallBack;
import hongcaosp.app.android.modle.bean.Message;
import hongcaosp.app.android.modle.bean.Pagebean;
import hongcaosp.app.android.modle.mi.MessageModle;

public class MessageModleImpl implements MessageModle {
    @Override
    public void messageList(String token, int type, int pageNumber, int pageSize, DataCallBack<Pagebean<Message>> callBack) {
        HttpParams params = new HttpParams();
        params.put("token", token);
        params.put("type", type);
        params.put("pageNumber", pageNumber);
        params.put("pageSize", pageSize);
        OkGo.<BaseResponse>post(BuildConfig.HOST + "/api/message/messageList").params(params).execute(callBack);
    }
}
